package de.gzork.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;

import com.google.appengine.api.datastore.Blob;

@Entity
public class SaveGame {

	@Id
	private String name;
	
	@OneToMany(fetch=FetchType.EAGER, cascade= CascadeType.ALL)
	private List<SmallBlob> data;
	
	public SaveGame() {
	}
	
	public SaveGame(String name, List<SmallBlob> data) {
		this.name = name;
		this.data = data;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setData(List<SmallBlob> data) {
		this.data = data;
	}

	public List<SmallBlob> getData() {
		return data;
	}
}
